home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 010a / ct40.zip / CT40.DOC < prev   
Text File  |  1991-10-29  |  13KB  |  286 lines

  1.                   Cache Test v 4.0
  2.  
  3.                          by
  4.  
  5.                    George Spafford
  6.  
  7.                    CopyRight 1991
  8.  
  9. Summary:
  10.  
  11. This program is designed to help a user evaluate the impacts
  12. of a cache, or the changes to an existing cache, on a drive's
  13. performance.  
  14.  
  15. Furthermore, with users' increasingly using caches during a 
  16. variety of tasks, it is important to find the optimal cache 
  17. settings given the task at hand.  Whereas a word processor 
  18. might make heavy usage of sequential files, a database 
  19. might make heavy usage of random access files.  With this 
  20. in mind, the memory requirements, sectors cached, write 
  21. delays and so forth have many possible variations.
  22.  
  23. By default, Cache Test creates a 10,000 record sequential file
  24. using 32 byte records and then a 10,000 record random access file
  25. that again uses 32 byte record lengths.  Note, even if the default is
  26. changed, any sample string length will be increased by two bytes by
  27. the addition of a CR/LF.  You may want to compensate accordingly if
  28. you wish to be exact in your measurements.  The sample record size
  29. indicator displays the TRUE sample string size.
  30.  
  31. This program uses BIOS to do all of its reads and writes, 
  32. so any hardware or software cache should be able to get 
  33. some good "hits."  In attempt to flush caches during the 
  34. test, files are frequently opened and closed.
  35.  
  36. All of the times that this program writes are the result of
  37. subtracting the beginning time from the ending time.  Nothing
  38. fancy, so the values are relatively accurate.  Note, if you do
  39. some math to compute access times per record, you will run into
  40. the age old problem of significant digits.  This program only accounts
  41. for one decimal location (0.1).  As such, if you try to take the
  42. timings out to 1/100th of a second, the resulting error factor can be
  43. quite high, relatively speaking that is.
  44.  
  45. Remember, if an outcome is in doubt, use a larger sample size!  That is
  46. to say, increase the number of bytes that are written to the disk.  The
  47. other alternative is to increase the number of sample passes.  You'll
  48. notice that results begin to stabilize with file sizes of 5000 records,
  49. 32 bytes, and 5 passes.
  50.  
  51.           
  52. A few definitions:
  53.  
  54.       "ButterFly Test"     The middle record is read and then a
  55.                            record is alternatingly and read in each
  56.                            direction from the middle.  Say you have
  57.                            a 100 record file, the read order would
  58.                            be 50,49,51,48,52,47,53 . . . and so on.
  59.                            
  60.       "CR/LF"              Carriage Return and Line Feed.  Decimal 13
  61.                            and 10 respectively (CHR$(13),CHR$(10)).  These
  62.                            two characters are used as "end of record"
  63.                            delimiters.  As such, they are included in the
  64.                            byte count when a record is written.  If the
  65.                            sample string is 10 bytes, these two additional
  66.                            bytes are added to the end resulting in a total
  67.                            of 12 bytes.  Bear this in mind if you want exact
  68.                            values.
  69.                                
  70.       "Crescendo Read"     Records are read alternatingly in from the end of
  71.                            the file and the beginning file.  This is to say,
  72.                            record 1, 10000, 2, 9999, 3, 9998, 4, 9997 etc.
  73.                            Okay, Okay ... so my definition of Crescendo is
  74.                            backwards... They didn't spell the Macintosh
  75.                            correctly either.
  76.  
  77.       "Random Read/Write"  Random functions generate independent random
  78.                            reads and writes.
  79.  
  80.       "Read-by-1"          A random access file's records are being accessed
  81.                            one at a time.
  82.  
  83.       "Stepping-by-10"     A random access file's records are being accessed
  84.                            on every 10th record.
  85.  
  86.       "Write-by-10"        A random access file's records are being updated
  87.                            on every 10th record.
  88.  
  89.       "Overall"            This is the total time of all tests AND file
  90.                            deletes.  So, it might not reflect the sum
  91.                            of all tests exactly, but it should be very
  92.                            close.
  93.  
  94.       I just wanted to make those meanings a little clearer.
  95.  
  96.       ******************************************************************
  97.  
  98.           Usage of this program is:
  99.  
  100.           CT  </D:d><F:bbb></N:nnn></S></R></B></?>
  101.  
  102.             CT by itself will test the active drive that it is on with
  103.             the default record length of 32 bytes and 10,000 records.
  104.                             
  105.         Explanation of switches:
  106.  
  107.         /D:d    This specifies "d" as the drive to be tested.
  108.  
  109.         /F:b    This specifies the number of fixed bytes per record.
  110.                 It must be between 1 and 32,765.  The default is 32 bytes.
  111.                 Use this with the /N:n switch to enhance your testing.
  112.                 (Because of CR/LF usage in the file structure, the logical
  113.                 limit for a user input is 32,765 and not the allowable
  114.                 32,767)
  115.  
  116.         /N:n    This specifies the number of test records.
  117.                 Note, the only limitation here is the available space 
  118.                 on your test drive.  You can also go as small as
  119.                 you want, but you will reach a point where your test
  120.                 will lose its validity.
  121.                 The default value, if this switch is not used, is
  122.                 10,000 records.
  123.  
  124.         /P:ppp  This specifies the number of test passes.  In other words,
  125.                 the number of times that the test will repeat.  If this
  126.                 option is > 1 then when the passes have all completed,
  127.                 a Summary screen appears with average sequential, random
  128.                 and total times.  If there is only one pass, then the
  129.                 summary screen will not be displayed
  130.  
  131.         /B      Test both sequential and random access records.
  132.         /R      Test random access records only.
  133.         /S      Test sequential access records only.
  134.         /W      Wait after each screen (pause).
  135.  
  136.  
  137. Suggestions:
  138.  
  139. You might want to set up a batch file that purges your cache
  140. before CT is run.  This will allow the cache to have a little
  141. fairer test, as opposed to starting out partially full.
  142. Also, if you are interested in the actual hits on your cache, most
  143. cache programs (PC-CACHE and NCACHE for sure) have status switches
  144. that allow you to see the results from the cache's point of view.
  145.  
  146. The test file is written in the root directory of the target drive.
  147. The file name is TEST$$CT.SPD.  If the critter appears, don't panic!
  148. It probably didn't get deleted because of an interrupted test.
  149.  
  150. HISTORY:
  151.  
  152.       V4.0  10/29/91
  153.   
  154.             Whew... This one has quite a few updates:
  155.  
  156.             1.  COLOR (makes things a lot easier to read).
  157.             2.  Tracking of timer ticks has been tightened down.
  158.             3.  Created the ability to perform a number of tests
  159.                 and then present a summary screen with averages
  160.                 using the /P:ppp switch.
  161.             4.  /W switch added for pausing after screens.
  162.  
  163.  
  164.       V3.5  9/03/91
  165.  
  166.             In response to Mike Focke's request for counters in the
  167.             crescendo and butterfly tests, I have again enabled them.
  168.             And Mike, thanks for the suggestions ;-)
  169.  
  170.       V3.1  8/26/91
  171.  
  172.             The timing routine is now based on the presence of 18.2
  173.             clock ticks per one second.  The 100ths decimal location is
  174.             still weak, but improved.
  175.  
  176.       V3.0  7/10/91
  177.  
  178.             Well, I accessed the BIOS segment for clock ticks to create
  179.             the decimal level counters.  The second decimal place is
  180.             weak in terms of its accuracy, but I decided to leave it in.
  181.             For those of you worried about significant digits, the 
  182.             algorithm used for this uses 18 clock ticks to generate one
  183.             second of time.
  184.  
  185.             The test records are now 32 bytes total.
  186.  
  187.             Output screen formatting is improved.
  188.  
  189.             If the program is invoked without any parameters, it executes
  190.             on the active drive with a 10,000 record test made up of 32
  191.             bytes.  All user input now occurs on the command line through
  192.             the use of switches.          
  193.  
  194.       V2.6  5/24/91
  195.  
  196.             I honestly did not intend another update so soon.  It was
  197.             pointed out to me that the file structure that I had been
  198.             using was variable.  As such, it made ratio comparisons
  199.             somewhat difficult.  Now, the default fixed record length
  200.             is 32 bytes (the test record count is still 10,000).  The
  201.             user can specify the record length by using the /F:bbbbb
  202.             switch.  "bbbbb" must be between 0 and 32,765.   Since the
  203.             values are now fixed, a user can do a little math (remember
  204.             that subject folks??) and discern the records per second and
  205.             so forth.  Do note, that two bytes are added to the test string
  206.             in the files (CR/LF to be exact) that is why the maximum byte
  207.             size that a user can specify is 32,765 and not the 32,767 legal
  208.             default limit.
  209.               
  210.       V2.5  5/22/91
  211.  
  212.             1.  An actual test file byte size field has been added.
  213.                 This should allow users to track the actual sizes of
  214.                 the test records being written.
  215.             2.  Some users suggested that truly random reads and writes
  216.                 should be added.  This serves to get away from any form
  217.                 of sequentialized data.
  218.             3.  Again, more cosmetic touchups.
  219.  
  220.       V2.0  5/16/91
  221.  
  222.             Due to some users having limited drive space, switches
  223.             were added to allow for different size tests to 
  224.             occur.  I was somewhat hesitant to do this because it
  225.             negated the ability to call results "standard," but 
  226.             what really is standard?
  227.  
  228.             Switches were also added to allow users to select 
  229.             what tests they want to run.  For now, all that can 
  230.             be specified is whether or not to run all tests, 
  231.             sequential tests only, or random tests only.
  232.  
  233.             The ButterFly test was also added in an attempt to 
  234.             give look-ahead caches a hard time.  Some of the 
  235.             caches that use a FIFO method of purging will have a 
  236.             heck of a time with this one.
  237.  
  238.             Added timers/cleared up timers for the sequential and 
  239.             overall tests.  Also speaking of timers, to avoid 
  240.             slowing down some routines, I have removed some of 
  241.             the video effects that were for the user's benefit 
  242.             only.
  243.  
  244.             Special thanks to Jonathan Fisk for all of his 
  245.             suggestions and debugging efforts.
  246.  
  247.             Special thanks also go out to Tim Akright, the sysop 
  248.             of Queued Access for all of his support.
  249.  
  250.  
  251.       V1.0  5/10/91
  252.  
  253.             Well, I released it.  That pretty well sums it up.
  254.  
  255.  
  256.         I hope this program helps you evaluate some of your problems
  257.         or even makes some solutions/benefits clear.  This program is
  258.         released as shareware.  Its price is $5 for each concurrently
  259.         used copy.  If you have any suggestions or comments, I'd REALLY
  260.         like to hear those too.
  261.  
  262.                 Sincerely,
  263.  
  264.                 George Spafford
  265.                 3001 LakeShore Drive, #329
  266.                 St. Joseph, MI 49085
  267.  
  268.         Data:  (616) 468-5026  Queued Access BBS 14.4Kb USR Dual HST
  269.                                FIDOnet: 1:2340/6
  270.                                (File Req's allowed or give a call & 
  271.                                 say "hi" to Tim, the BBS's sysop).
  272.  
  273.         And now for the unpleasantries:
  274.  
  275.         Code CopyRight:  July 1991
  276.         
  277.         CT IS DISTRIBUTED AS IS.  THE AUTHOR (GEORGE SPAFFORD) MAKES NO
  278.         WARRANTY OF ANY KIND, EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED
  279.         TO WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE,
  280.         WITH RESPECT TO THIS SOFTWARE AND DOCUMENTATION. IN NO EVENT SHALL
  281.         THE AUTHOR BE LIABLE FOR ANY DAMAGES, INCLUDING LOST PROFITS, LOST
  282.         SAVINGS, OR ANY OTHER INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
  283.         OUT OF THE USE OF OR THE INABILITY TO USE THIS PROGRAM.
  284.         ----------------------------------------------------------------
  285.         
  286.